package com.type;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

public class Contact implements Parcelable {
	String number;
	String displayname;

	public Contact() {

	}

	public Contact(String number, String displayname) {
		this.number = number;
		this.displayname = displayname;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getDisplayname() {
		return displayname;
	}

	public void setDisplayname(String displayname) {
		this.displayname = displayname;
	}

	public static final Parcelable.Creator<Contact> CREATOR = new Creator<Contact>() {

		public Contact createFromParcel(Parcel source) {
			Log.i("dd", "createFromParcel:" + source);
			// TODO Auto-generated method stub
			Contact contact = new Contact();
			contact.displayname = source.readString();
			contact.number = source.readString();

			return contact;
		}

		public Contact[] newArray(int size) {
			// TODO Auto-generated method stub
			return new Contact[size];
		}

	};

	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(displayname);
		dest.writeString(number);

	}
}